You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks so much @amd-asalykov, validating on a bare metal MI350X right now. Also thanks @laasya-konidala for setting things up and checking the codebase + verifying!
@simonguozirui you might have noticed that in the current implementation we rely on os.environ["CXX"] = "hipcc" in src/kernelbench/prompts/model_new_ex_add_hip.py to make pytorch's load_inline work with hip kernels. We didn't explicitly tell LLMs to include this LOC in the generated kernels. Instead we expect that LLMs will include it automatically based on the model_new_ex_add_hip.py example. As an alternative, we could introduce a backend-specific prompt and explicitly ask LLMs to include os.environ["CXX"] = "hipcc"
Gotcha os.environ["CXX"] = "hipcc" triggers the HIP compiler and prevents it from running hipify (we had this issue last year when @willhu-jpg and I tried to implement AMD support; it would just hipify CUDA code #37). We can keep that as part of the in-context example which becomes a part of the prompt automatically, the same way we treat other backends like TK that need special include library (no need for backend specific warnings and instructions)
Added a few guardrails to ensure a separate AMD and NVIDIA code path
Two more small things to close things off
reward hack checking -> hip kernel must use hip-related keywords (regex-based matching)
L2 cache thrashing, for clearing cache rn we allocate a big tensor to thrash it, so for AMD need to see if the tensor size still works well there
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
How to install:
Run on MI350X/MI355X:
Run on MI300X/MI325X: